﻿{include file="admin/header.htm"}
<table align="center" cellpadding="0" cellspacing="1" class="table_list">
    <caption>用户组管理</caption>
    <tr>
        <th width="5%">groupid</th>
        <th width="30%">名称</th>
        <th width="30%">管理操作</th>
    </tr>
    
    {foreach $groups as $group}
    <tr>
        <td class="align_c">{$group.groupid}</td>
        <td style="color:{if $group.groupid eq 1}green{else}blue{/if};">{$group.groupname}</td>
        <td class="align_c">
            <a href="{$smarty.const.ADMIN_NAME}?m=admin&c=group&a=add&groupid={$group.groupid}">修改</a> | 
            <a href="javascript:;" onclick="deleteConfirm('{$smarty.const.ADMIN_NAME}?m=admin&c=group&a=manage&op=delete&groupid={$group.groupid}')">删除</a>
        </td>
    </tr>
    {/foreach}
</table>
{include file="admin/footer.htm"}
<script language="javascript">
function deleteConfirm(url) {
    if(window.confirm('确定删除该用户组吗？')) {
        location.href = url;
    }
}
</script>